package com.tianji.remark.controller;


import com.tianji.remark.domain.dto.LikeRecordFormDTO;
import com.tianji.remark.service.ILikedRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 点赞记录表 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-26
 */
@RestController
@RequestMapping("/likes")
@Api(tags = "点赞业务相关接口")
public class LikedRecordController {

    @Autowired
    private ILikedRecordService likedRecordService;
    @PostMapping()
    @ApiOperation("点赞业务")
    public void addLike(LikeRecordFormDTO dto){
        likedRecordService.addLike(dto);
    }
    @GetMapping("/list")
    @ApiOperation("查询用户点赞列表")
    public Set<Long> isBizLiked(@RequestParam("bizIds") List<Long> bizIds){
        return likedRecordService.isBizLiked(bizIds);
    }

}
